import re
#1
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n1\..+?\n|\n1．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#2
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n2\..+?\n|\n2．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#3
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n3\..+?\n|\n3．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#4
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n4\..+?\n|\n4．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#5
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n5\..+?\n|\n5．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#6
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n6\..+?\n|\n6．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#7
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n7\..+?\n|\n7．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#8
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n8\..+?\n|\n8．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#9
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n9\..+?\n|\n9．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#10
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n10.+?\n|\n10．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
        print(each)
        q.write(each+'\n')
q.close()
#11
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n11.+?\n|\n11．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
        print(each)
        q.write(each+'\n')
q.close()
#12
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n12.+?\n|\n12．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
        print(each)
        q.write(each+'\n')
q.close()
#13
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n13\..+?\n|\n13．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
        print(each)
        q.write(each+'\n')
q.close()
#14
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n14\..+?\n|\n14．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#15
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n15\..+?\n|\n15．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#16
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n16\..+?\n|\n16．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#17
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n17\..+?\n|\n17.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#18
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n18\..+?\n|\n18．.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#19
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n19\..+?\n|\n19.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()
#20
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n20\..+?\n|\n20.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#21
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n21\..+?\n|\n21.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()


#22
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n22\..+?\n|\n22.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()


#23
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n23\..+?\n|\n23.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()


#24
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n24\..+?\n|\n24.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()


#25
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n25\..+?\n|\n25.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#26
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n26\..+?\n|\n26.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#27
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n27\..+?\n|\n27.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#28
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n28\..+?\n|\n28.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#29
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n29\..+?\n|\n29.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()

#30
q = open("resalt.txt","a")

f = open("n1.txt")
word = f.read()
p = r"\n30\..+?\n|\n30.+?\n"
imglist = re.findall(p,word)
for each in imglist:
	print(each)
	q.write(each+'\n')
q.close()















